Skip to content

Conversation

@Kahjax
Copy link
Contributor

@Kahjax Kahjax commented Mar 2, 2022

This is my final changes to my code with peters comments and Dr. Jones notes aswell

@bjones1 bjones1 mentioned this pull request Mar 2, 2022
int light_y; // the Y position of the light of power
int initial_tx; // Thor's starting X position
int initial_ty; // Thor's starting Y position
cin >> light_x >> light_y >> initial_tx >> initial_ty; cin.ignore();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain this line -- what does it do? Why is it here?

while (1) {


int remaining_turns; // The remaining amount of turns Thor can move. Do not remove this line.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the comment on the previous line, so it will be rendered by CodeChat.



int remaining_turns; // The remaining amount of turns Thor can move. Do not remove this line.
cin >> remaining_turns; cin.ignore();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain. Why do this? Why ignore?

----------------
**Based on the position light of power I first determined which direction he would travel and then developed this code on the basis of each test code.**

**Test case 1 & 2:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove your notes on each test case, and instead focus on how to solve the overall problem. I like instructions on how to run the tests cases, though -- leave that.

Code for Movement
------------------
*/
// **this is the fourth test case...**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put comments explaining what this line does right here, rather than in the preceding paragraphs.

initial_ty++;
}
// **This is the first test case below...**
else if(light_x > initial_tx) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do all the other cases only have one comparison? There's no way to go NE, for example.

}
// **Don't forget to include the "else{}" statment at the end.**
else{};
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix spacing -- all the code should be indented, so that each bracket is has its own horizontal position.

@bjones1
Copy link
Contributor

bjones1 commented Mar 2, 2022

Resubmit by midnight, 3-Mar.

@bjones1
Copy link
Contributor

bjones1 commented Mar 7, 2022

I haven't seen any progress on this...

@bjones1
Copy link
Contributor

bjones1 commented Mar 8, 2022

Is this superseded by #22?

@Kahjax Kahjax closed this Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants